import request from '@/utils/request'
import qs from 'qs'

/** 用户组用户列表API */
export function findUserByUserGroupId(query) {
  return request({
    url: '/api/admin/sysusergroup/findUserByUserGroupId',
    method: 'get',
    params: query
  })
}
/** 文件仓储列表API */
export function findSysFileStorageByCondition(query) {
  return request({
    url: '/api/file/sysfilestorage/findSysFileStorageByCondition',
    method: 'get',
    params: query
  })
}
/** 文件仓储删除API */
export function deleteSysFileStorageById(data) {
  return request({
    url: '/api/file/sysfilestorage/deleteSysFileStorageById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 获取信息
export function openDir(query) {
  return request({
    url: '/api/file/sysfile/openDir',
    method: 'get',
    params: query
  })
}
export function findFileWorkflowStatusByBusinessId(query) {
  return request({
    url: '/api/file/sysfilebusiness/findFileWorkflowStatusByBusinessId',
    method: 'get',
    params: query
  })
}
export function deleteCommand(data) {
  return request({
    url: '/api/file/sysfile/deleteCommand',
    method: 'post',
    params: {
      ids: data
    }
  })
}
/** 我的消息API */
export function queryMyNotification(query) {
  return request({
    url: '/api/notification/notification/queryMyNotification',
    method: 'get',
    params: query
  })
}
/** 发起流程API */
export function queryProcessDefinition(query) {
  return request({
    url: '/api/activiti/process/queryProcessDefinition',
    method: 'get',
    params: query
  })
}
/** 流程任务历史API开始 */

export function queryHistoricProcessInstance(query) {
  return request({
    url: '/api/activiti/history/queryHistoricProcessInstance',
    method: 'get',
    params: query
  })
}

/** 流程任务历史API结束 */
/** 待签收任务API开始 */

export function queryPersonalTask(query) {
  return request({
    url: '/api/activiti/task/queryPersonalTask',
    method: 'get',
    paramsSerializer: params => {
      return qs.stringify(params, { arrayFormat: 'brackets' })
    },
    params: query
  })
}
/** 待签收任务API结束 */
/** 科研项目API */
export function querySynPrjmgt(query) {
  return request({
    url: '/api/syn/synprjmgt/querySynPrjmgt',
    method: 'get',
    params: query
  })
}
export function exportSynPrjmgt(data) {
  return request({
    url: '/api/syn/synprjmgt/exportSynPrjmgt',
    method: 'post',
    responseType: 'blob',
    data
  })
}
// 删除科研项目
export function softDeleteSynPrjmgt(data) {
  return request({
    url: '/api/syn/synprjmgt/softDeleteSynPrjmgt',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 获取科研项目管理附件列表
export function querySynPrjmgtFile(query) {
  return request({
    url: '/api/syn/synprjmgtfile/querySynPrjmgtFile',
    method: 'get',
    params: query
  })
}
// 删除科研项目附件
export function deletePrjmgtFile(data) {
  return request({
    url: '/api/syn/synprjmgtfile/deletePrjmgtFile',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 查询科研外协项目分页
export function querySynOutsource(query) {
  return request({
    url: '/api/syn/synoutsource/querySynOutsource',
    method: 'get',
    params: query
  })
}
// 获取科研外协项目管理附件列表
export function querySynOutsourceFile(data) {
  return request({
    url: '/api/syn/synoutsourcefile/querySynOutsourceFile',
    method: 'get',
    params: data
  })
}
// 删除科研外协项目
export function softDeleteSynOutsource(data) {
  return request({
    url: '/api/syn/synoutsource/softDeleteSynOutsource',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 删除外协科研项目附件
export function deleteSynOutsourceFile(data) {
  return request({
    url: '/api/syn/synoutsourcefile/deleteSynOutsourceFile',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 机理研究进展及成果管理
export function findSynMechanismByCondition(query) {
  return request({
    url: '/api/syn/synmechanism/findSynMechanismByCondition',
    method: 'get',
    params: query
  })
}
export function exportSynMechanism(data) {
  return request({
    url: '/api/syn/synmechanism/exportSynMechanism',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function softDeleteSynMechanismById(data) {
  return request({
    url: '/api/syn/synmechanism/softDeleteSynMechanismById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 工艺研究进展及成果管理
export function findSynCraftByCondition(query) {
  return request({
    url: '/api/syn/syncraft/findSynCraftByCondition',
    method: 'get',
    params: query
  })
}
export function exportSynCraft(data) {
  return request({
    url: '/api/syn/synmechanism/exportSynCraft',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function softDeleteSynCraftById(data) {
  return request({
    url: '/api/syn/syncraft/softDeleteSynCraftById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 有形化成果管理
export function findSynTangibleByCondition(query) {
  return request({
    url: '/api/syn/syntangible/findSynTangibleByCondition',
    method: 'get',
    params: query
  })
}
export function exportSynTangible(data) {
  return request({
    url: '/api/syn/syntangible/exportSynTangible',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function softDeleteSynTangibleById(data) {
  return request({
    url: '/api/syn/syntangible/softDeleteSynTangibleById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 国内外研究管理
export function findSynOverseasByCondition(query) {
  return request({
    url: '/api/syn/synoverseas/findSynOverseasByCondition',
    method: 'get',
    params: query
  })
}
export function exportSynOverseas(data) {
  return request({
    url: '/api/syn/synoverseas/exportSynOverseas',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function softDeleteSynOverseasById(data) {
  return request({
    url: '/api/syn/synoverseas/softDeleteSynOverseasById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 国家政策法规管理
export function findSynPolicyByCondition(query) {
  return request({
    url: '/api/syn/synpolicy/findSynPolicyByCondition',
    method: 'get',
    params: query
  })
}
export function exportSynPolicy(data) {
  return request({
    url: '/api/syn/synpolicy/exportSynPolicy',
    method: 'post',
    responseType: 'blob',
    data
  })
}

export function softDeleteSynPolicyById(data) {
  return request({
    url: '/api/syn/synpolicy/softDeleteSynPolicyById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 月报周度例会
export function deleteProdRegularMeetingById(data) {
  return request({
    url: '/api/proc/prodregularmeeting/deleteProdRegularMeetingById',
    method: 'post',
    params: {
      id: data
    }
  })
}
export function exportProdRegularMeeting(data) {
  return request({
    url: '/api/proc/prodregularmeeting/exportProdRegularMeeting',
    method: 'post',
    responseType: 'blob',
    data
  })
}
// // 井号管理
export function findSysWellByCondition(query) {
  return request({
    url: '/api/base/syswell/findSysWellByCondition',
    method: 'get',
    params: query
  })
}
// 井号管理 导出
export function exportSysWell(data) {
  return request({
    url: '/api/base/syswell/exportSysWell',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function softDeleteSysWellById(data) {
  return request({
    url: '/api/base/syswell/softDeleteSysWellById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 生产单位管理
export function findSysProdOrgByCondition(query) {
  return request({
    url: '/api/base/sysprodorg/findSysProdOrgByCondition',
    method: 'get',
    params: query
  })
}
export function deleteSysProdOrgById(data) {
  return request({
    url: '/api/base/sysprodorg/deleteSysProdOrgById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 区块管理
export function findSysAreaByCondition(query) {
  return request({
    url: '/api/base/sysarea/findSysAreaByCondition',
    method: 'get',
    params: query
  })
}
export function deleteSysAreaById(data) {
  return request({
    url: '/api/base/sysarea/deleteSysAreaById',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 地质情况
export function findWellExploitWithImpl(query) {
  return request({
    url: '/api/proc/prodwellgeology/findWellExploitWithImpl',
    method: 'get',
    params: query
  })
}
// 开发情况
export function findWellExploitWithImplPro(query) {
  return request({
    url: '/api/proc/prodwellexploit/findWellExploitWithImpl',
    method: 'get',
    params: query
  })
}

// 文件管理
export function queryFile(query) {
  return request({
    url: '/api/file/file/queryFile',
    method: 'get',
    params: query
  })
}
export function deleteFile(data) {
  return request({
    url: '/api/file/file/deleteFile',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 用户管理
export function querySysUser(query) {
  return request({
    url: '/api/admin/sysuser/querySysUser',
    method: 'get',
    params: query
  })
}
export function exportSysUser(data) {
  return request({
    url: '/api/admin/sysuser/exportSysUser',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function deleteSysUser(data) {
  return request({
    url: '/api/admin/sysuser/deleteSysUser',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 菜单管理
export function querySysMenu(query) {
  return request({
    url: '/api/admin/sysmenu/querySysMenu',
    method: 'get',
    params: query
  })
}
export function exportSysMenu(data) {
  return request({
    url: '/api/admin/sysmenu/exportSysMenu',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function deleteSysMenu(data) {
  return request({
    url: '/api/admin/sysmenu/deleteSysMenu',
    method: 'post',
    params: {
      id: data
    }
  })
}

// 机构管理
export function querySysOrg(query) {
  return request({
    url: '/api/admin/sysorg/querySysOrg',
    method: 'get',
    params: query
  })
}
export function exportSysOrg(data) {
  return request({
    url: '/api/admin/sysorg/exportSysOrg',
    method: 'post',
    responseType: 'blob',
    data
  })
}
// 删除
export function deleteSysOrg(data) {
  return request({
    url: '/api/admin/sysorg/deleteSysOrg',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 字典管理
export function querySysDict(query) {
  return request({
    url: '/api/admin/sysdict/querySysDict',
    method: 'get',
    params: query
  })
}
export function exportSysDict(data) {
  return request({
    url: '/api/admin/sysdict/exportSysDict',
    method: 'post',
    responseType: 'blob',
    data
  })
}
// 删除
export function deleteSysDict(data) {
  return request({
    url: '/api/admin/sysdict/deleteSysDict',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 区域管理
export function querySysRegion(query) {
  return request({
    url: '/api/admin/sysregion/querySysRegion',
    method: 'get',
    params: query
  })
}
export function exportSysRegion(data) {
  return request({
    url: '/api/admin/sysregion/exportSysRegion',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function deleteSysRegion(data) {
  return request({
    url: '/api/admin/sysregion/deleteSysRegion',
    method: 'post',
    params: {
      regionCode: data
    }
  })
}
// 参数管理
export function querySysParam(query) {
  return request({
    url: '/api/admin/sysparam/querySysParam',
    method: 'get',
    params: query
  })
}
export function exportSysParam(data) {
  return request({
    url: '/api/admin/sysparam/exportSysParam',
    method: 'post',
    responseType: 'blob',
    data
  })
}
export function deleteSysParam(data) {
  return request({
    url: '/api/admin/sysparam/deleteSysParam',
    method: 'post',
    params: {
      id: data
    }
  })
}
// 消息管理
export function queryNotification(query) { return request({ url: '/api/notification/notification/queryNotification', method: 'get', params: query }) }
export function deleteNotification(data) { return request({ url: '/api/notification/notification/deleteNotification', method: 'post', params: { id: data }}) }
// 应用管理
export function queryAppClient(query) { return request({ url: '/api/uaa/appclient/queryAppClient', method: 'get', params: query }) }
export function deleteAppClient(data) { return request({ url: '/api/uaa/appclient/deleteAppClient', method: 'post', params: { id: data }}) }
// 角色管理
export function querySysRole(query) { return request({ url: '/api/admin/sysrole/querySysRole', method: 'get', params: query }) }
export function exportSysRole(data) { return request({ url: '/api/admin/sysrole/exportSysRole', method: 'post', responseType: 'blob', data }) }
export function deleteSysRole(data) { return request({ url: '/api/admin/sysrole/deleteSysRole', method: 'post', params: { id: data }}) }
// 接口权限
export function querySysUrl(query) { return request({ url: '/api/admin/sysurl/querySysUrl', method: 'get', params: query }) }
export function exportSysUrl(data) { return request({ url: '/api/admin/sysurl/exportSysUrl', method: 'post', responseType: 'blob', data }) }
export function deleteSysUrl(data) { return request({ url: '/api/admin/sysurl/deleteSysUrl', method: 'post', params: { id: data }}) }
// 数据权限
export function queryRoleCode(data) { return request({ url: '/api/admin/sysrole/queryRoleCode', method: 'get' }) }
// 代码信息
export function queryGenerator(query) { return request({ url: '/api/generator/generator/queryGenerator', method: 'get', params: query }) }
export function deleteGenerator(data) { return request({ url: '/api/generator/generator/deleteGenerator', method: 'post', params: { id: data }}) }
/** 租户API开始 */
export function querySysTenant(query) { return request({ url: '/api/admin/systenant/querySysTenant', method: 'get', params: query }) }
export function deleteSysTenant(data) { return request({ url: '/api/admin/systenant/deleteSysTenant', method: 'post', params: { id: data }}) }
export function exportSysTenant(data) { return request({ url: '/api/admin/systenant/exportSysTenant', method: 'post', responseType: 'blob', data }) }
/** 租户API结束 */
/** 模型API开始 */
export function queryModel(query) { return request({ url: '/api/activiti/model/queryModel', method: 'get', params: query }) }
export function deleteModel(data) { return request({ url: '/api/activiti/model/deleteModel', method: 'post', params: { modelId: data }}) }

/** 注入压力预测API开始 */
export function findPredictionPressureByCondition(data) { return request({ url: '/api/prediction/predictionpressure/findPredictionPressureByCondition', method: 'get', params: data }) }
export function deletePredictionPressureById(data) { return request({ url: '/api/prediction/predictionpressure/deletePredictionPressureById', method: 'post', params: { id: data }}) }
export function exportPredictionPressure(data) { return request({ url: '/api/prediction/predictionpressure/exportPredictionPressure', method: 'get', responseType: 'blob', data }) }
/** 注入压力预测API结束 */

